/*
 * WebService.h
 *
 *  Created on: 2021年12月26日
 *      Author: vicent-PC
 */

#ifndef MAIN_HAL_SERVERS_WEBSERVICE_H_
#define MAIN_HAL_SERVERS_WEBSERVICE_H_

enum WebStatus {
	WEB_OK,
	WEB_WIFI_FAIL,
	WEB_SERVER_FAIL
};

enum WifiStatus {
	WEB_WIFI_NOT_CONNECT,
	WEB_WIFI_CONNECTTED,
};

class WebService {
public:
	WebService();
    static WebService* getInstance() {
        if (m_pInstance == nullptr) m_pInstance = new WebService();
        return m_pInstance;
    }
	virtual ~WebService();
	int setupWifi();
	int start();
	int getRSSILevel();
	int getStatus() {return mStatus;};
    int getWifiStatus() {return mWifiStatus;};
private:
	int mStatus = 0;
    int mWifiStatus = WEB_WIFI_NOT_CONNECT;
    static WebService * m_pInstance;
};

#endif /* MAIN_HAL_SERVERS_WEBSERVICE_H_ */
